var de = decodeURIComponent; //解码////
var en = encodeURIComponent; ///编码///
var httpUrl = "https://z3.gkgoo.cn/api/"

var call_netA = function(url, argument, callbackA, errorback, type, httpsUrl, heads) {
	var callUrl = ""
	if (httpsUrl) {
		callUrl = url
	} else {
		callUrl = httpUrl + url
	}
	//alert("url="+url+"&datas="+JSON.stringify(argument))
	//alert(PCajaxurl)
	type = type || "post";
	$.ajax({
		type: type,
		url: callUrl,
		data: argument,
		async: false,
		cache: false,
		contentType:heads?heads:false,
		processData: false,
		success: function(msg) {
			//alert(msg)
			callbackA(msg)
		},
		error: function(er) {
			errorback(er);
		}
	});
};


function getUrlParamURLys(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	var r = de(window.location.search).substr(1).match(reg); //匹配目标参数
	if (r != null) {
		return unescape(r[2]);
	}
	return false; //返回参数值
}

function isWeChat() {
	var ua = window.navigator.userAgent.toLowerCase();
	if (ua.match(/MicroMessenger/i) == 'micromessenger') {
		return true;
	} else {
		return false;
	}
}
